#include "BL24C02.h"
#include "string.h"

iic_bus_struct bl24c02_iic_struct = {
	.IIC_SDA_PORT = GPIOA,
	.IIC_SCL_PORT = GPIOA,
	.IIC_SDA_PIN = GPIO_PIN_11,
	.IIC_SCL_PIN = GPIO_PIN_12
};


void BL24C02_Write(u8 addr, u8 len, u8* buff)
{
	myiic_send_bytes(&bl24c02_iic_struct, BL24C02_ADDRESS, addr, buff, len);
}

void BL24C02_Read(u8 addr, u8 len, u8* buff)
{
	myiic_read_bytes(&bl24c02_iic_struct, BL24C02_ADDRESS, addr, buff, len);
}

void BL24C02_Init(void)
{
	BL24C02_CLK_ENBALE;
	iic_dev_init(&bl24c02_iic_struct);
}



